<!--
*Author：富行天下团队
 *
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/SupplierNews.js此处编写
 -->
 <template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
      :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields"
      :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>
  </div>
</template>
 
<script>
import extend from "@/extension/mall/SupplierNews.js";
import ViewGrid from "@/components/basic/ViewGrid.vue";
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: "id",
        footer: "Foots",
        cnName: "供应商列表",
        name: "SupplierNews",
        url: "/SupplierNews/",
        sortName: "createDate",
      },
      extend: extend,
      editFormFields: {
        tikTokPoiId: "",
        violinPoiId: "",
        supplierCode: "",
        isMessage: "",
        smsMode: "",
        signCode: "",
        free_rate: "",
        smsId: "",
        spare10: "",
        contactPerson: "",
        contactPhone: "",
        supplierName: "",
        supplierName1: "",
        supplierType: "",
        systemName: "",
        systemCode: [],
        supplierPhone: "",
        supplierAddress: "",
        appKey: "",
        appSecret: "",
        supplierUrl: "",
        isSendMessages: "",
        union_pay_store_id: "",
        admissions: "",
        isAvailable: "",
        supplierRemark: "",
        address: [],
        full_address: "",
        creator: "",
        createID: "",
        createDate: "",
        modifier: "",
        modifyID: "",
        modifyDate: "",
        merchantCode: "",
        merchantName: "",
      },
      editFormOptions: [
        [
          {
            title: "供应商编码",
            required: true,
            field: "supplierCode",
            type: "text",
          },
        ],
        [
          {
            title: "供应商名称",
            required: true,
            field: "supplierName",
            type: "text",
          },
          { title: "供应商简称", field: "supplierName1", type: "text" },
        ],
        [
          {
            dataKey: "SupplierType",
            data: [],
            title: "供应商类别",
            required: true,
            field: "supplierType",
            type: "select",
          },
          {
            dataKey: "system_trees",
            data: [],
            title: "系统名称",
            required: true,
            field: "systemCode",
            type: "cascader",
          },
        ],
        [
          {
            title: "联系方式",
            required: true,
            field: "supplierPhone",
            type: "telephones",
          },
          { title: "供应商地址", field: "supplierAddress", type: "text" },
        ],
        [
          { title: "Appkey", field: "appKey", type: "text", hidden: true },
          {
            title: "AppSecret",
            field: "appSecret",
            type: "text",
            hidden: true,
          },
        ],
        ,
        [
          {
            dataKey: "GetProvinces",
            data: [],
            title: "省市区级联",
            required: true,
            field: "address",
            type: "cascader",
            changeOnSelect: true,
          },
          {
            title: "详细地址",
            required: true,
            field: "full_address",
            type: "text",
          },
        ],
        [
          { title: "cmmcode", field: "cmmcode", type: "text", hidden: true },
          { title: "酒店ID", field: "hotelId", type: "text", hidden: true },
        ],
        [
          { title: "ver", field: "ver", type: "text", hidden: true },
          {
            title: "appkey_xms",
            field: "appkey_xms",
            type: "text",
            hidden: true,
          },
        ],

        [
          { title: "缺省Url", field: "supplierUrl", type: "text" },
          { title: "session", field: "session", type: "text", hidden: true },
        ],
        [{ title: "手续费费率", field: "free_rate", type: "text" }],
        [
          { title: "入园人次", field: "admissions", type: "number" },
          {
            dataKey: "enable",
            data: [],
            title: "是否可用",
            required: true,
            field: "isAvailable",
            type: "switch",
          },
        ],
        [
          {
            title: "备注",
            field: "supplierRemark",
            colSize: 12,
            type: "textarea",
          },
        ],
        [
          {
            title: "多选参数",
            field: "supplierParams",
            disabled: true,
            colSize: 6,
            type: "text",
            hidden: true,
          },
        ],
        [
          {
            title: "是否发送短信",
            field: "isMessage",
            type: "switch",
            hidden: false,
          },
          {
            dataKey: "sms_mode",
            data: [],
            title: "短信模式",
            field: "smsMode",
            type: "select",
            hidden: false,
          },
        ],
        [
          {
            dataKey: "Signs",
            data: [],
            title: "短信签名",
            field: "signCode",
            type: "select",
            hidden: false,
          },
          {
            dataKey: "Messages",
            data: [],
            title: "短信模板",
            field: "smsId",
            type: "select",
            hidden: false,
          },
        ],
        [
          {
            title: "模板内容",
            field: "spare10",
            type: "text",
            hidden: false,
            disabled: true,
            colSize: 12,
          },
        ],
        [
          { title: "联系人", field: "contactPerson", type: "text" },
          { title: "联系人电话", field: "contactPhone", type: "text" },
        ],
        [
          { title: "抖音门店ID", field: "tikTokPoiId", type: "text" },
          { title: "快手门店ID", field: "violinPoiId", type: "text" },
        ],
        [
          {
            title: "通联支付门店ID",
            field: "union_pay_store_id",
            type: "text",
          },
        ],
      ],
      searchFormFields: {
        supplierCode: "",
        supplierName: "",
        supplierPhone: "",
        supplierSystem: 0,
      },
      searchFormOptions: [
        [
          { title: "供应商名称", field: "supplierName", type: "like" },
          { title: "供应商编码", field: "supplierCode", type: "like" },
          { title: "供应商联系方式", field: "supplierPhone", type: "like" },
          { title: "", field: "supplierSystem",hidden: true },
        ],
      ],
      columns: [
        {
          field: "supplierCode",
          title: "供应商编码",
          type: "string",
          width: 200,
          require: true,
          align: "left",
          sortable: true,
        },
        {
          field: "supplierName",
          title: "供应商名称",
          type: "string",
          width: 200,
          require: true,
          align: "left",
        },
        {
          field: "supplierName1",
          title: "供应商简称",
          type: "string",
          width: 200,
          align: "left",
        },
        {
          field: "supplierType",
          title: "供应商类别",
          type: "string",
          bind: { key: "SupplierType", data: [] },
          width: 120,
          require: true,
          align: "left",
        },
        //    {field:'systemName',title:'系统名称',type:'string',width:120,align:'left'},
        //    {field:'systemCode',title:'系统编码',type:'string',bind:{ key:'SupplierType',data:[]},width:120,require:true,align:'left'},
        {
          field: "supplierPhone",
          title: "供应商联系方式",
          type: "string",
          width: 120,
          require: true,
          align: "left",
        },
        {
          field: "supplierAddress",
          title: "供应商地址",
          type: "string",
          width: 250,
          align: "left",
        },
        {
          field: "address",
          title: "省市区级联",
          bind: { key: "GetProvinces", data: [] },
          type: "string",
          width: 250,
          align: "left",
        },
        {
          field: "full_address",
          title: "详细地址",
          type: "string",
          width: 250,
          align: "left",
        },
        {
          field: "appKey",
          title: "Appkey",
          type: "string",
          width: 220,
          align: "left",
        },
        {
          field: "appSecret",
          title: "AppSecret",
          type: "string",
          width: 220,
          align: "left",
        },
        {
          field: "supplierUrl",
          title: "缺省Url",
          type: "string",
          width: 250,
          align: "left",
        },
        {
          field: "isSendMessages",
          title: "是否发送短信",
          type: "int",
          bind: { key: "enable", data: [] },
          width: 80,
          align: "left",
        },
        {
          field: "admissions",
          title: "入园人次",
          type: "string",
          width: 120,
          align: "left",
        },
        {
          field: "isAvailable",
          title: "是否可用",
          type: "sbyte",
          bind: { key: "enable", data: [] },
          width: 80,
          require: true,
          align: "left",
        },
        {
          field: "isDelete",
          title: "是否删除",
          type: "int",
          width: 80,
          hidden: true,
          require: true,
          align: "left",
        },
        {
          field: "supplierRemark",
          title: "备注",
          type: "string",
          width: 250,
          align: "left",
        },
        {
          field: "creator",
          title: "创建人",
          type: "string",
          width: 120,
          readonly: true,
          align: "left",
        },
        {
          field: "createDate",
          title: "创建时间",
          type: "datetime",
          width: 220,
          readonly: true,
          align: "left",
          sortable: true,
        },
        {
          field: "modifier",
          title: "修改人",
          type: "string",
          width: 120,
          readonly: true,
          align: "left",
        },
        {
          field: "modifyDate",
          title: "修改时间",
          type: "datetime",
          width: 220,
          readonly: true,
          align: "left",
          sortable: true,
        },
        {
          field: "spare15",
          title: "扩展字段1",
          type: "string",
          width: 120,
          hidden: true,
          align: "left",
        },
        {
          field: "spare6",
          title: "扩展字段1",
          type: "string",
          width: 120,
          hidden: true,
          align: "left",
        },
        {
          field: "spare7",
          title: "扩展字段1",
          type: "string",
          width: 120,
          align: "left",
        },
        {
          field: "spare8",
          title: "扩展字段1",
          type: "string",
          width: 120,
          hidden: true,
          align: "left",
        },
        {
          field: "spare9",
          title: "扩展字段1",
          type: "string",
          width: 120,
          hidden: true,
          align: "left",
        },
        {
          field: "spare14",
          title: "扩展字段1",
          type: "string",
          width: 120,
          hidden: true,
          align: "left",
        },
        {
          field: "spare13",
          title: "扩展字段1",
          type: "string",
          width: 120,
          hidden: true,
          align: "left",
        },
        {
          field: "spare11",
          title: "扩展字段1",
          type: "string",
          width: 120,
          hidden: true,
          align: "left",
        },
        {
          field: "createID",
          title: "创建人ID",
          type: "int",
          width: 120,
          hidden: true,
          align: "left",
        },
        {
          field: "id",
          title: "主键",
          type: "string",
          width: 120,
          hidden: true,
          readonly: true,
          require: true,
          align: "left",
        },
        {
          field: "merchantCode",
          title: "商户编码",
          type: "string",
          bind: { key: "Merchants", data: [] },
          width: 120,
          align: "left",
        },
        {
          field: "merchantName",
          title: "商户名称",
          type: "string",
          width: 120,
          hidden: true,
          align: "left",
        },
        {
          field: "modifyID",
          title: "修改人ID",
          type: "int",
          width: 120,
          hidden: true,
          align: "left",
        },
        {
          field: "roleId",
          title: "弃用",
          type: "int",
          width: 120,
          hidden: true,
          align: "left",
        },
        {
          field: "spare10",
          title: "扩展字段1",
          type: "string",
          width: 120,
          hidden: true,
          align: "left",
        },
        {
          field: "spare12",
          title: "扩展字段1",
          type: "string",
          width: 120,
          hidden: true,
          align: "left",
        },
      ],
      detail: {
        cnName: "列表",
        columns: [
          // { field: 'distributorId', title: '渠道id', type: 'int', width: 90, align: 'left', hidden: true, },
          // { field: 'interfaceid', title: '主键', type: 'int', width: 90, hidden: true, readonly: true, require: true, align: 'left' },
          // { field: 'interfaceUrl', title: 'interfaceUrl', type: 'string', edit: { type: '' }, width: 220, align: 'left' },
          // { field: 'interfaceRequestParam', title: '参数', type: 'string', edit: { type: '' }, width: 90, align: 'left' },
          // { field: 'interfaceType', title: '接口类型', type: 'string', bind: { key: 'InterfaceType', data: [] }, edit: { type: 'select' }, width: 220, align: 'left' },
          // { field: 'distributorId', title: '渠道id', type: 'int', width: 90, align: 'left', hidden: true, },
          {
            field: "pointsld",
            title: "点位主键",
            type: "int",
            width: 90,
            hidden: true,
            readonly: true,
            require: true,
            align: "left",
          },
          {
            field: "pointsName",
            title: "点位名称",
            type: "string",
            edit: { type: "" },
            width: 120,
            align: "left",
          },
          // { field: 'pointsCode', title: '点位编码', type: 'string', edit: { type: '' }, width: 90, align: 'left' },
          {
            field: "pointsSys",
            title: "点位管理员",
            type: "string",
            edit: { type: "" },
            width: 90,
            align: "left",
          },
        ],
        sortName: "id",
        key: "pointsId",
      },
    };
  },
};
export default vueParam;
</script>
